/**
 * Class for the SubChair
 * Author: My Hoang
 * TCSS360
 */

package superConference;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * The class for the SubChair extends AbstractUser
 * 
 * @author MyHoang
 *
 */
public class SubProgramChair extends AbstractUser
{
	protected ArrayList<Paper> my_papers;
	
	/**
	 * Constructor for the SubChair
	 * @param userID ID of the SubChair
	 * @param email Email of the SubChair
	 * @param name Name of the Subchair
	 */
	SubProgramChair(int userID, String email, String name) 
	{
		super(userID, email, name);
		setPapers(new ArrayList<Paper>());
	}
	
	public void getPaper(int paperID)
	{
		for(Paper paper : my_papers)
		{
			if(paper.getId() == paperID)
			{
				return;
			}
		}
			
	}
	
	public ArrayList<Paper> getPaper()
	{
		return my_papers;
	}
	
	public void addPaper(Paper thePaper)
	{
		my_papers.add(thePaper);
	}
	
	public void setPapers(ArrayList<Paper> thePapers)
	{
		my_papers = thePapers;
	}
	/**
	 * Class to Assign paper for reviewer to be review.
	 * @param theReviewer The Reviewer assign to the paper
	 * @param userID The Reviewer ID
	 * @param the_paper 
	 * @return the Reviewer with the paper assign to.
	 */
	public Reviewer assignReviewer(int userID, Paper the_paper)
	{
		Reviewer theReviewer = new Reviewer(userID, getEmail(), getName());
		return theReviewer;
	}
	
	
	/**
	 * Class to recommend paper to the ProgramChair
	 * @param paperID The paper being Recommended
	 */
	@SuppressWarnings("unused")
	private void setRecommendation(int paperID, PaperStatus recommendation)
	{
		Paper temp = null;
		for(Paper paper : my_papers)
			if(paper.getId() == paperID)
			{
				temp = paper;
				PaperStatus.valueOf("recommended");
			}
	}

}
